/*
 * FieldSelectingEvent.java
 *
 * Created on 24 marzec 2007, 12:43
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package daychooser;

import java.util.Date;

/**
 *
 * @author Przemek
 */
public class FieldSelectingEvent
{
    private DaysChooserControl sender;
    
    private boolean selectable;
    
    private boolean selecting;
    
    private int fieldNo;
    
    private Date fieldDate;
    
    
    
    /** Creates a new instance of FieldSelectingEvent */
    public FieldSelectingEvent( DaysChooserControl sender, boolean selecting, int fieldNo, Date date )
    {
        this.sender = sender;
        this.selectable = true;
        this.selecting = selecting;
        this.fieldNo = fieldNo;
        this.fieldDate = date;
    }

    public DaysChooserControl getSender()
    {
        return sender;
    }

    /**
     * Selectable - czy dana komorka moze zostac zaznaczona
     */
    public boolean isSelectable()
    {
        return selectable;
    }

    /**
     * Selectable - czy dana komorka moze zostac zaznaczona. W celu wylaczenia
     * mozliwosci zaznaczania nalezy przestawic ja na false.
     */
    public void setSelectable(boolean selectable)
    {
        this.selectable = selectable;
    }
    
    /**
     * Czy dana komorka jest zaznaczana czy odznaczana
     * @return true - komorka jest zaznaczana
     * false - komorka jest odznaczana
     */
    public boolean isSelecting()
    {
        return selecting;
    }

    public int getFieldNo()
    {
        return fieldNo;
    }

    public Date getFieldDate()
    {
        return fieldDate;
    }
    
}
